﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Com.Rivyer.Model;
using Com.Rivyer.BLL;

namespace Com.Rivyer.Web
{
    public partial class top : System.Web.UI.Page
    {
        private readonly userlogoutlogBll logoutbll = new userlogoutlogBll();

        protected void Page_Load(object sender, EventArgs e)
        {
     
        }

        protected void imgbtn_exit_Click(object sender, ImageClickEventArgs e)
        {
            //退出清除session,登记登出时间
            userlogoutlogModel logoutmodel = new userlogoutlogModel();
            logoutmodel.username = Session["username"].ToString();
            logoutmodel.logoutip = Request.UserHostAddress;
            logoutmodel.logouttime = DateTime.Now;
            logoutbll.Add(logoutmodel);
            Session.Clear();
            Response.Write("<script>top.location='./login.aspx'</script>");
        }

    }
}